﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace DotNetUI.Controls
{
    public class DotNetNavBarItem : Button
    {
        static DotNetNavBarItem()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(DotNetNavBarItem), new FrameworkPropertyMetadata(typeof(DotNetNavBarItem)));
        }
        public static readonly DependencyProperty IconProperty = DependencyProperty.Register(nameof(Icon),typeof(ImageSource),typeof(DotNetNavBarItem));
        /// <summary>
        /// 图标
        /// </summary>
        public ImageSource Icon { get=> (ImageSource)GetValue(IconProperty); set=>SetValue(IconProperty,value); }

        public static readonly DependencyProperty IconMarginProperty = DependencyProperty.Register(nameof(IconMargin),typeof(double),typeof(DotNetNavBarItem),new FrameworkPropertyMetadata(0d));
        /// <summary>
        /// 图标内边距
        /// </summary>
        public double IconMargin { get => (double)GetValue(IconMarginProperty); set => SetValue(IconMarginProperty, value); }
    }
}
